package stream;

import java.util.Arrays;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/5/6
 * 问题 5：获取 Integer 集合中的最大值
 */
public class Test05 {
    public static void main(String[] args) {
        Integer[] numbers = {6, 7, 3, 8, 1, 2, 9};

        Integer max = Arrays.stream(numbers)
                .max(Integer::compare)
                .orElse(null);
        System.out.println("最大值：" + max);
    }
}
